<!doctype html>
<html lang="zh">
<head>
  <meta charset="UTF-8">
  <title>KeyCodes</title>
<script type="text/javascript">
  	/**
             * 禁用右键菜单
             */
            document.oncontextmenu = function(){
                event.returnValue = false;
            };
            /**
             * 禁用选中功能
             */
            document.onselectstart = function(){
                event.returnValue = false;
            };
            /**
             * 禁用复制功能
             */
            document.oncopy = function(){
                event.returnValue = false;
            };
            /**
             * 禁用鼠标的左右键
             * @param {Object} e
             */
            document.onmousedown = function(){
                if(event.which==1){//鼠标左键
                    return false;
                }
                
                if(event.which==3){//鼠标右键
                    return false;
                }
            };
  	
  </script>
  <link rel="stylesheet" href="keycode.css">
  <link rel="icon" href="ico.png" type="imagess/x-icon">
</head>
<body>
<!-- 原网址：http://keycode.info/-->

  <div class="display">
    <div class="wrap" aria-live="polite" aria-atomic="true">
      <p class="keycode-display"></p>
      <p class="text-display">按任意键获取JavaScript按键代码</p>
    </div>
  </div>
 <script src="scripts.js"></script>
</body>
</html>